package jtk.project4.fleet.field;

import java.awt.Dimension;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.ComboField;

public class NewEquipmentGeneralStatusField extends GroupControl{

	private ComboField statusField;
	private ComboField ownershipField;
	private ComboField CustomerField;
	
	
	public NewEquipmentGeneralStatusField(String bindID){
		setTitle("header.status");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields(){
		
		statusField = new ComboField("equipments","status");
		statusField.setPreferredSize(new Dimension(100, 20));
		
		ownershipField = new ComboField("equipments","Ownership");
		ownershipField.setPreferredSize(statusField.getPreferredSize());
		
		CustomerField = new ComboField("equipments","customer");
		CustomerField.setPreferredSize(statusField.getPreferredSize());
	
	}
	
	private void createLayout() {
		setLayout(new FormLayout())
		.addLabel("Status:").addField(statusField)
		.addRow()
		.addLabel("Ownership:").addField(ownershipField)
		.addRow()
		.addLabel("Customer:").addField(CustomerField);
	}
}
